from pyim import config
from pyim.handler import BaseHandler
from pyim.packet import Packet


class Handler(BaseHandler):
    def handle(self, connection, packet):
        # test the max number of the clients.
        reply = Packet()
        reply["command"] = packet["command"]
        reply["id"] = packet["id"]
        reply["arguments"] = {
            "charset_encoding": config.charset,
            "web_api": "http://127.0.0.1"
        }
        connection.route(reply)
